package com.fc.v2.model;

import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@Data
public class OrderModel {
    private String cashierUid;
    private Cashier cashier;
    private Long uid;
    private String sn;
    private String datetime;
    private String sysUpdateTime;
    private java.math.BigDecimal totalAmount;
    private java.math.BigDecimal totalProfit;
    private java.math.BigDecimal discount;
    private String externalOrderNo;
    private String remark;
    private java.math.BigDecimal rounding;
    private String ticketType;
    private java.math.BigDecimal invalid;
    private String webOrderNo;
    private List<Payment> payments;
    private TicketSpendDetail ticketSpendDetail;
    private TicketOnTable ticketOnTable;
    private PointUsage pointUsage;
    private List<Item> items;


    @Data
    public static class Cashier {
        private String jobNumber;
        private String name;
        private Long customerUid;
    }

    @Data
    public static class Payment {
        private String code;
        private java.math.BigDecimal amount;
    }

    @Data
    public static class TicketSpendDetail {
        private java.math.BigDecimal spendOutStore;
        private java.math.BigDecimal peopleNum;
    }

    @Data
    public static class TicketOnTable {
        private String tableNumber;
        private String tableName;
        private String tableCardNo;
    }

    @Data
    public static class PointUsage {
        private java.math.BigDecimal customerUid;
        private java.math.BigDecimal point;
        private java.math.BigDecimal money;
        private java.math.BigDecimal exchangeType;
    }

    @Data
    public static class Item {
        private String name;
        private BigDecimal buyPrice;
        private java.math.BigDecimal sellPrice;
        private java.math.BigDecimal customerPrice;
        private java.math.BigDecimal quantity;
        private java.math.BigDecimal discount;
        private java.math.BigDecimal customerDiscount;
        private java.math.BigDecimal totalAmount;
        private java.math.BigDecimal totalProfit;
        private java.math.BigDecimal isCustomerDiscount;
        private Long productUid;
        private String productBarcode;
        private List<Ticketitemattribute> ticketitemattributes;
    }

    @Data
    public static class Ticketitemattribute {
        private String attributeName;
        private String attributeValue;
    }
}





